import pinia from '@/store'
import useUserStore from '@/store/modules/user'
let userStore = useUserStore(pinia)
export default (app: any) => {
  app.directive('permission', {
    mounted(el: any, binding: any) {
      if (!userStore.buttons.includes(binding.value)) {
        el.remove()
      }
    },
  })
}
